package chai.ning.prequel;

import java.util.Arrays;

public class Container1Test3 {

	public static void main(String[] args) {

		Container1 c3 = new Container1(3);

		c3.add("人");
		c3.add("猴");
		c3.add("鱼");
		c3.add("蛇");
		c3.add("龍");

		System.out.println(c3);

		c3.set(2, "猪");

		System.out.println(c3);

		System.out.println(c3.get(3));

		c3.remove(3);

		System.out.println(c3);

		System.out.println(c3.indexOf("龍"));

		System.out.println(c3);

		System.out.println(c3.indexOf("猫"));

		System.out.println("------------------------- ");

		c3.remove("猫");

		System.out.println(c3);

		c3.add("猫" );
		
		System.out.println(c3);
		
		c3.remove("猫");

		System.out.println(c3);
	}
}
